package com.heima.cloud.clients;

import com.heima.cloud.clients.fallback.OrderFeignApiFallBack;
import com.heima.cloud.pojo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "order-service",fallback = OrderFeignApiFallBack.class)
public interface OrderFeignApi {

    @GetMapping("order/{id}")
    public List<Order> findOrderByUserId(@PathVariable("id")String username);
}
